﻿// -----------------------------------------------------------------------
// <copyright file="IStatesManager.cs" company="Microsoft">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace RRSync.Lib
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using RRSync.Lib.Models;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public interface IFileStatesManager
    {
        FileStatesModel FileStatesCache { get; }

        event StateChangesEventHandler StateChanged;

        void LoadStates(string filePath);
        void SaveStates(string filePath);
        void Sync(string directoryPath);
        void GenerateFileStates(string directoryPath);
    }

    public class StateChangesEventArgs
    {
        public string FileName { get; set; }
        public FileStateModel FileState { get; set; }
        public ChangeTypes ChangeType { get; set; }
    }

    public enum ChangeTypes
    {
        Create,
        Update,
        Delete
        // rename will be recognize as delete + create
    }

    public delegate void StateChangesEventHandler(object sender, StateChangesEventArgs stateChanges);
}
